package com.wct.mall.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author WEI
 * @date 2020/3/22
 */
@Getter
@Setter
@ToString
public class ValidBean {
    private Integer id;

    @NotBlank(message = "name不能为空")
    private String name;

    @Pattern(regexp = "^1(3|4|5|6|7|8|9)\\d{9}", message = "手机号码格式错误")
    @NotBlank
    private String phone;

    @Email(message = "email不能为空")
    private String email;
}
